﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Member.Model;
using System.Linq.Expressions;
using Member.IDAL;

namespace Member.DAL
{
    /// <summary>
    /// 用户管理
    /// </summary>
    public class UsersManagerDAL:BaseDAL<User>,IUsersManageDAL
    {
        /// <summary>
        /// 根据条件查询
        /// </summary>
        /// <param name="WhereLambda">查询条件</param>
        /// <returns></returns>
        public User isuser(Expression<Func<User, bool>> WhereLambda)
        {
            List<User> users = GetModels(WhereLambda).ToList();
            if (users.Count > 0)
            {
                return users.First();
            }
            return null;
        }
    }
}
